package com.bestv.bsr.core.context;

/**
 * @author taojiacheng
 */
public class RecommendContextHolder {

    private static final ThreadLocal<RecommendContext> CONTEXT_HOLDER = new ThreadLocal<>();

    public static RecommendContext setRecommendContext(RecommendContext recommendContext) {
        CONTEXT_HOLDER.set(recommendContext);
        return recommendContext;
    }

    public static RecommendContext getRecommendContext() {
        return CONTEXT_HOLDER.get();
    }


    public static void clearRecommendContext() {
        CONTEXT_HOLDER.remove();
    }
}
